﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Way.Bus.Model.Purview;
using Way.Bus.Model;
using Way.EAP.DataAccess.Entity;
using Way.Bus.WMS.Model;

namespace Way.Bus.Wms.Model.BaseData
{
    public class WmsRoleData : RoleData
    {
        HierarchicalEntityView<RoleData, WmsRoleDataWareHouse> _warehouseItem;
        public HierarchicalEntityView<RoleData, WmsRoleDataWareHouse> WarehouseItem
        {
            get
            {
                if (_warehouseItem == null)
                    _warehouseItem = new HierarchicalEntityView<RoleData, WmsRoleDataWareHouse>(this);
                return _warehouseItem;
            }
        }
    }
    [EntityClassAttribut("Way_RoleDataWareHouse", "仓库限制", IsOnAppendProperty = true)]
    public class WmsRoleDataWareHouse : BusinessBase
    {
        [EntityForeignKey(typeof(WmsRoleData), "ID")]
        [EntityField(8)]
        public int ParentID { get; set; }
        [EntityControl("可见仓库", false, true, 1)]
        [EntityForeignKey(typeof(WareHouse), "ID", "WAREHOUSENAME")]
        [EntityField(8)]
        public int WHID { get; set; }
    }
}
